﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcCaja.Core.Interfaces;
using Chilis.Caja.Data.Models;

namespace MvcCaja.Core
{
    public class CajaTurnoCajeroService : ICajaTurnoCajeroService
    {
        public String obtenerTurno(String sCodigoCaja, String sCodigoCajero)
        {
            ModelDataContext db = new ModelDataContext();
            
            return  (   from n in db.CajaTurnoCajero
                        where n.IdCaja.Equals(sCodigoCaja) && n.IdCajero.Equals(sCodigoCajero)
                        select n).First<CajaTurnoCajero>().IdTurno;
        }

    }
}
